import configJs from '@/config'
export function getToken () {
    return window.localStorage.getItem(configJs.api.tokenKey)
}

export function setToken (token) {
    // 登录
    window.sessionStorage.clear()
    return window.localStorage.setItem(configJs.api.tokenKey, token)
}

export function removeToken () {
    // 需要登录
    window.sessionStorage.clear()
    return window.localStorage.removeItem(configJs.api.tokenKey)
}

export function removeAll () {
    window.sessionStorage.clear()
    window.localStorage.clear()
}
